package com.jvm;

public class User {
    int one;
    String two;

    public User(int one, String two) {
        this.one = one;
        this.two = two;
    }

    public User() {
    }

    @Override
    protected void finalize()throws Throwable{
        OOMTest.list.add(this);
        System.out.println("关闭资源，user" + one + "即将被回收");
    }

    public void sout(){
        System.out.println("输出使用自定义加载器加载改方法");
    }
}
